# -*- mode: snippet -*-
# --
String hostname;
try {
    InetAddress addr = InetAddress.getLocalHost();
    hostname = addr.getHostName();
}
catch (UnknownHostException e) {
    hostname = "UNKNOWN";
}